﻿@using Newtouch.Infrastructure;
@{
    ViewBag.Title = "读卡方式";
    Layout = "~/Views/Shared/_Form.cshtml";
}
@Html.Partial("_YibaoCommonView")
<div style="float:left;">
    <input type="text" id="txtInput" style="width:180px;height:20px;margin-left:100px;margin-top:8px;" placeholder="电子凭证/磁卡码"  autocomplete="off"/><br />
    <input type="button" id="sk" name="sk" class="btn btn-primary" style="width:180px;height:40px;font-size:25px;margin-left:100px;margin-top:8px;" value="刷医保卡" onclick="skOnClick('2')" />
    <br />
    <input type="button" id="sck" name="sm" class="btn btn-primary" style="width:180px;height:40px;font-size:25px;margin-left:100px;margin-top:8px;" value="刷磁条卡" onclick="skOnClick('0')" />
    <br />
    <input type="button" id="sm" name="sm" class="btn btn-primary" style="width:180px;height:40px;font-size:25px;margin-left:100px;margin-top:8px;" value="扫电子医保码" onclick="skOnClick('3')" />

</div>

<script type="text/javascript">
    debugger;
    var mzh = $.request('mzh');
    $(function () {
        $("#txtInput").focus();
    });

    function skOnClick(dkfs) {
        if(dkfs!="2")
        {
            if (!$('#txtInput').val()) {
                $.modalMsg('请刷凭证码', 'warning');
                $("#txtInput").focus();
                return;
            }
        }
        $.modalOpen({
            id: "ZFToYBForms",
            title: "自费转医保",
            url: "/OutpatientManage/OutpatCharge/ZFToYBForm?mzh=" + mzh + "&dkfs=" + dkfs + "&pzm=" + $("#txtInput").val(),
            width: "550px",
            height: "380px",
            btn: ['', '关闭'],
            btnclass: ['', 'btn btn-danger'],
            success: function (iframeId) {
                $.modalClose();
            }
        });
    };
</script>